package com.foreknow.demo5;

import com.foreknow.demo4.E;

public class SalariesEmployee extends Employee {
    private double monthlySalary;

    public SalariesEmployee(String name, int number, MyDate birthday,double monthlySalary) {
        super(name, number, birthday);
        this.monthlySalary = monthlySalary;
    }

    public String ToString(){
        return super.toString()+"\tsalariedEmployee:"+ monthlySalary;
    }

    public double getMonthlySalary() {
        return monthlySalary;
    }

    public void setMonthlySalary(double monthlySalary) {
        this.monthlySalary = monthlySalary;
    }

    @Override
    public double earnings() {
        return monthlySalary;
    }
}
